#ifndef MONSTER_H
#define MONSTER_H

#include <QObject>
#include <QString>
#include <QThread>
#include <QDebug>


class Monster : public QThread
{
    Q_OBJECT
public:
    enum MonsterColor{
        blue,
        red,
        white
    };

    enum MonsterType{
        golem,
        lizard,
        drake,
        baron
    };

    explicit Monster(Monster::MonsterType monsterType = golem, Monster::MonsterColor monsterColor = blue, int respawnTime = 0, QObject *parent = 0);

    void kill();
    void run();
    void setAlive();

    void setMonsterType(Monster::MonsterType type);
    void setMonsterColor(Monster::MonsterColor color);
    void setRespawnTime(int respawnTime);
    QString getMonsterType(Monster::MonsterType monsterType);
    QString getMonsterColor(Monster::MonsterColor monsterColor);
    int getRespawnTime();
    Monster::MonsterType getMonsterType();
    Monster::MonsterColor getMonsterColor();
    QString getName();

    const static MonsterColor colorBlue = blue;
    const static MonsterColor colorViolet = red;
    const static MonsterColor colorWhite = white;

    const static MonsterType typeGolem = golem;
    const static MonsterType typeLizard = lizard;
    const static MonsterType typeDrake = drake;
    const static MonsterType typeBaron = baron;
private:
    int respawnTime; //time before respawning in miliseconds
    int timeBeforeRespawn;    //time (ms) before the respawn
    QString name;
    MonsterColor monsterColor;
    MonsterType monsterType;
    bool isDead;
signals:
    void signalTimeBeforeRespawnChanged(int);
    void signalStateChanged(bool);              //true if alive else false

public slots:

};

#endif // MONSTER_H
